// config
const env = process.env
let config = {
  mongo: 'mongodb://localhost/book',
  secret: 'eUeugqwuygfWiawuhefuvbensi ru#23875y2734tgwre',
  redis: {
    host: '127.0.0.1',
    port: 6379,
    password: '',
    db: 0,
  },
}

config = Object.assign(config, env)
config.get = (key) => {
  // env default
  return env[key] || config[key] || ''
}
export default config
